<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix = "s" uri ="/struts-tags" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>
  <head> 
    <base href="<%=basePath%>">
    
    <title>项目中心</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
   
   <center>
  
  <table border="1">
  <tr>
  	<td width="200" height="150">
  	<s:if test="#session.usertype==null">
		<a href="login.jsp">登录</a><br>
  	  	<a href="register.jsp">注册</a> 
  	</s:if>
  	<s:else>
  		欢迎<br/>
  		<a href="loginRegisterAction!exit">退出登录</a>
  		
  	</s:else>
	</td>
  	<td colspan="2" width="*">项目平台</td>
  </tr>
	
<tr>
  <td>目录检索</td>
  
  <td width="600">	
  	<s:action name="indexAction!searchNewProject" executeResult="false"></s:action>
   	
   	
   	<h2>最新项目</h2>
   	<table border="1">
   		<tr>
   			
   			<td width="100">项目名</td>
   			<td width="50">状态</td>
   			<td width="50">开始时间</td>
   			<td width="50">报名截止时间</td>
   			
   			<td width="50">研究领域</td>
   		</tr>
   		<!--
   		<s:property value="newproject"/>
   		-->
   		<s:iterator value="#request.newProject" id="papNew">
   		<tr>   			
   			<td><a href="projectAction!showProject?Pid=<s:property value='#papNew.project.pid'/>">
   			    <s:property value="#papNew.project.name"></s:property></a>
   			</td>
   			<td><s:property value="#papNew.proTime.status"></s:property></td>
   			<td><s:property value="#papNew.proTime.startTime"></s:property></td>
   			<td><s:property value="#papNew.proTime.endtTime"></s:property></td>
   			<td><s:property value="#papNew.project.field"></s:property></td>
   					
   		</tr>
   		
   		</s:iterator>
   	</table>
   </td>
 <td width="600">	
  	<s:action name="indexAction!searchAgainProject" executeResult="false"></s:action>
   	
   	
   	<h2>再次发布项目</h2>
   	<table border="1">
   		<tr>
   			
   			<td width="100">项目名</td>
   			<td width="50">状态</td>
   			<td width="50">开始时间</td>
   			<td width="50">报名截止时间</td>
   			
   			<td width="50">研究领域</td>
   		</tr>
   		
   		<s:iterator value="#request.againProject" id="papAgain">
   		<tr>   			
   			<td>
   				<a href="projectAction!showProject?Pid=<s:property value='#papAgain.project.pid'/>">
   				<s:property value="#papAgain.project.name"></s:property></a>
   			</td>
   			<td><s:property value="#papAgain.proTime.status"></s:property></td>
   			<td><s:property value="#papAgain.proTime.startTime"></s:property></td>
   			<td><s:property value="#papAgain.proTime.endtTime"></s:property></td>
   			<td><s:property value="#papAgain.project.field"></s:property></td>
   					
   		</tr>
   		<s:token></s:token>
   		</s:iterator>
   	</table>
   </td>
   
   <td width="170">
   	  	<s:action name="indexAction!searchHotProject" executeResult="false"></s:action>
   	<h2>热门项目</h2>
   	<table border="1">
   		<tr>
   			
   			<td width="90">项目名</td>
   			<td width=“60">热度</td>
   		</tr>
   		<s:iterator value="#request.hotProject" id="papHot">
   		<tr>   			
   			<td heigh="40"><a href="projectAction!showProject?Pid=<s:property value='#papHot.project.pid'/>"><s:property value="#papHot.project.name"></s:property></a></td>
   			<td><s:property value="#papHot.project.click"></s:property></td>
   					
   		</tr>
   		
   		</s:iterator>
   	</table>
   </td>
  </tr>
 </table>
   	</center>
  </body>
</html>
